using System.Drawing;

namespace GDI
{
    public static class SizeExtentions
    {

        public static Size Add(this Size p1, Size p2)
        {
            return new Size(p1.Width + p2.Width, p1.Height + p2.Height);
        }

        public static Size Add(this Size p1, int Width, int Height)
        {
            return new Size(p1.Width + Width, p1.Height + Height);
        }

        public static Size Substract(this Size p1, Size p2)
        {
            return new Size(p1.Width - p2.Width, p1.Height - p2.Height);
        }

        public static Size Substract(this Size p1, int Width, int Height)
        {
            return new Size(p1.Width - Width, p1.Height - Height);
        }

        public static SizeF Substract(this Size p1, float Width, float Height)
        {
            return new SizeF(p1.Width - Width, p1.Height - Height);
        }
    }
}